<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s"  uri="/struts-tags"%>
<%String this_path=request.getContextPath();%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml" dir="ltr" lang="zh-CN">
<head>
<meta name="decorator" content="none" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<s:if test='type=="do"'>
<script type="text/javascript" src="<%=this_path%>/js/common/jquery.min.js"></script>
<script type="text/javascript" src="<%=this_path%>/js/common/jquery.PrintArea.js"></script>
</s:if>
<title>利息通知单</title>
</head>
<body>

<div id="dd">
<style type="text/css">
.tableprint{border-left:1px solid #000;padding:0;margin:0;}
.tableprint tr{height:0.6cm;}
.tableprint tr td{padding-left:3px;font-size:12px;border-bottom:1px solid #000;border-right:1px solid #000}
.border_top{border-top:1px solid #000;}
input[type='text']{width:120px}
.datepicker{width:110px;background:#ddd;border:1px solid #999}
</style>
<table class="tableprint border_top" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="6" ><p align="center" ><strong>青岛市黄岛区瑞丰小额贷款有限公司</strong></p>
    <p align="center" ><strong>贷款利息通知单</strong></p>
    <p align="center" >日期：
<s:if test='type!="change"'>
    <s:text name="f.date.ymdc"><s:param value="printData.pdate"/></s:text>
</form>
</s:if>
    </p></td>
  </tr>
  <tr>
    <td>贷款人  </td>
    <td colspan="3">${printData.dname}</td>
    <td>借款人 </td>
    <td >${printData.name}</td>
  </tr>
  <tr>
    <td >贷款人账号  </td>
    <td colspan="3" >${printData.dcard}</td>
    <td>借款人账号 </td>
    <td>${printData.cbankaccount}</td>
  </tr>
  <tr>
    <td >贷款人开户行 </td>
    <td colspan="3" >${printData.dbank}</td>
    <td>借款人开户行  </td>
    <td>${printData.cbankname}</td>
  </tr>
  <tr>
    <td style="width:2cm">借款金额</td>
    <td style="width:2.5cm">￥<s:text name="f.money"><s:param value="printData.totalmoney"/></s:text></td>
    <td style="width:1.5cm" >贷款日  </td>
    <td style="width:2.5cm" ><s:text name="f.date.ymdc"><s:param value="printData.startdate"/></s:text></td>
    <td style="width:2.5cm" >到期日  </td>
    <td style="width:4cm" ><s:text name="f.date.ymdc"><s:param value="printData.enddate"/></s:text></td>
  </tr>
  <tr>
    <td >积数</td>
    <td>￥<s:text name="f.money"><s:param value="printData.jishu"/></s:text></td>
    <td >计息周期
    </td>
    <td colspan="2" >自
    	${printData.interestbegindate} 起至
    	${printData.interestenddate} 止
    </td>
    <td >共计积数  </td>
  </tr>
  <tr>
    <td >按年利率</td>
    <td ><s:text name="f.number.five"><s:param value="printData.rate"/></s:text>%</td>
    <td >计利息  </td>
    <td>￥<s:text name="f.money"><s:param value="printData.lixi"/></s:text></td>
    <td >计复利   </td>
    <td>￥<s:text name="f.money"><s:param value="printData.fuli"/></s:text></td>
  </tr>
  <tr>
    <td >本期利息合计  </td>
    <td colspan="5" >（大写）人民币：${printData.lixihe}</td>
  </tr>
  <tr>
    <td >实收利息合计 </td>
    <td colspan="5" >（大写）人民币：${printData.lixihe}</td>
  </tr>
  <tr>
  	<td></td>
    <td >会计：</td>
    <td></td>
    <td >复核：  </td>
    <td></td>
    <td >记账：</td>
  </tr>
</table>
</div>

<s:if test='type=="change"'>
<form action="creditPrint!printInterestChange"  method="post">
<input type="hidden" name="id" value="${id}"/>
还息金额：<input type="text" name="money" value="${printData.lixi}" />
复利：<input type="text" name="moneyfuli" value="${printData.fuli}"/>
还息日期：<input type="text" name="thisdate" readonly="readonly" value="${printData.morenhuanxiri}" style="width:110px;background:#ddd;border:1px solid #999" class="datepicker"/>
<input type="submit" />
</form>
</s:if>
<s:elseif test='type=="sure"'>
实收利息：<s:text name="f.money"><s:param value="printData.lixi"/></s:text>
复利：<s:text name="f.money"><s:param value="printData.fuli"/></s:text>
收息日期：
<s:text name="f.date.ymdc"><s:param value="printData.pdate"/></s:text>
<input type="button" class="printrealsure" value="确认" />
</s:elseif>
<s:else>
<div id="button_area"><input type="button" id="print_btn" value="确认打印" /></div> 
</s:else>
<script type="text/javascript">
$(function(){ 
    $("#print_btn").click(function(){
        $("#dd").printArea();
    });
    $(".printrealsure").click(function(){
   		$thisid=$(this).parent("td").attr("id");
   		MessageDialog("./creditInterest!change?type=sure&id="+${id},"确认完成？","");
   	});
   	$('.datepicker').datetimepicker({
		dateFormat: "yy-mm-dd",
		showTimepicker: false,changeMonth: true,changeYear: true
	});
});  
</script>
</body>
</html>